<template>
  <a-config-provider :getPopupContainer="getPopupContainer">
    <img alt="Vue logo" src="./assets/logo.png" />
    <a-button type="primary" @click="handleChangeTheme"
      >Primary Button</a-button
    >
    <a-button type="primary" @click="handleChangeTheme2">Primary Button</a-button>
    <HelloWorld msg="Welcome to Your Vue.js App" />
  </a-config-provider>
</template>

<script>
import HelloWorld from './components/HelloWorld.vue';
import { ConfigProvider } from 'ant-design-vue';

export default {
  name: 'App',
  components: {
    HelloWorld,
  },
  methods: {
    handleChangeTheme() {
      ConfigProvider.config({
        prefixCls: 'ant',
        theme: {
          primaryColor: '#786765',
        },
      });
    },
    handleChangeTheme2() {
      ConfigProvider.config({
        prefixCls: 'ant',
        theme: {
          primaryColor: '#b24c40',
        },
      });
    },
  },
};
</script>

<style>
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  margin-top: 60px;
}
</style>
